package com.airlines.system.dao;

import java.util.List;

import com.airlines.base.dao.base.BaseMapper;
import com.airlines.system.domain.SysUser;
import org.apache.ibatis.annotations.*;

public interface SysUserMapper extends BaseMapper<SysUser, String> {

	/**
	 * 自定义的DAO接口，Mapper中必须实现
	 * 
	 * @param record
	 * @return
	 */
	List<SysUser> selectByQuery(SysUser record);

	/**通过id列表查询用户信息列表*/
	@Select("<script>"
			+ "SELECT * FROM t_sys_user WHERE id IN "
			+ "<foreach item='item' index='index' collection='userIds' open='(' separator=',' close=')'>"
			+ "#{item}"
			+ "</foreach>"
			+ "</script>")
	@ResultMap("com.airlines.system.dao.SysUserMapper.systemResultMap")
	List<SysUser> findByIds(@Param("userIds") List<String> userIds);
}